<?php e($javascript->codeBlock('$(document).ready(function() {$("#EventAddForm").ajaxForm(function() {$(".acontent").load("/admin/events");});});'));?>
<?php e($javascript->link('calendar'));?>
<?php e($this->renderElement('tinymce'));?>
<div id="event">
	<?php e($form->create('Event'));?>
		<fieldset id="event-add">
			<legend>Add a new event</legend>
		<?php e($form->input('venue'));?>
		<?php e($form->input('address'));?>
		<?php e($form->input('city'));?>
		<?php e($form->input('country_id', array('options' => $country)));?>
		<?php e($form->input('postcode'));?>
		<?php e($form->input('event_date', array('type'=>'text','class'=>'calendarSelectDate')));?>
		<?php e($form->input('event_time'));?>
		<?php e($form->input('event_type', array('options' => $event_type)));?>
		<?php e($form->input('notes'));?>
		<?php if($othAuth->group('name') == "Site Admins") {
				e($form->input('published', array('label'=>'Publish Event?')));
			} else {
				e($form->input('published', array('type'=>'hidden', 'value'=>0)));
			}
		?>
		<?php //e($form->input('user_id', array('type'=>'hidden', 'value'=>$author_id)));?>
		</fieldset>
		
		<?php e($form->submit('Submit Event', array('class'=>'add')));?> <?php e($html->link('Cancel', '/admin/events', array('class'=>'cancel')));?>
	<?php e($form->end());?>
</div>